import axios from '@/utils/request'


// 获取文章评论列表
export const getComments = params => axios({

  method: "GET",
  url: "/v1_0/comments",
  params
})

// 评论点赞
export const addCommentLike = target => axios({

  method: 'POST',
  url: '/v1_0/comment/likings',
  data: {
    target
  }
})
export const deleteCommentLike = target => axios({
  method: 'DELETE',
  url: `/v1_0/comment/likings/${target}`

})

// 添加评论
export const addComment = data => axios({

  method: 'POST',
  url: '/v1_0/comments',
  data
})
